package com.tarzan.api.feign;

import com.tarzan.api.feign.fallbackfactory.RemoteUserServiceFallbackFactory;
import com.tarzan.api.model.response.user.SysUserDetailInfoResp;
import com.tarzan.common.core.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Package com.tarzan.oauth.feign
 * @Title RemoteUserService
 * @Description TODO
 * @Author liujinshan
 * @CreateTime 2021/7/1 15:55
 */
@FeignClient(value = "tarzan-system",fallbackFactory = RemoteUserServiceFallbackFactory.class)
public interface RemoteUserService {

    /**
     * @title findUserInfoByUserName
     * @description TODO 远程调用 根据用户名查询用户信息
     * @param username
     * @return com.tarzan.common.core.base.BaseResponse<com.tarzan.api.model.response.user.SysUserInfoResp>
     * @author liujinshan
     * @data 2021/7/1 16:08
     */
    @GetMapping(value = "user/findUserInfoByUserName/{username}")
    BaseResponse<SysUserDetailInfoResp> findUserInfoByUserName(@PathVariable String username);

}
